/**
 * 用户信息模块
 */
// 文件上传模块
const multer = require('multer');
const upload = multer({ dest: 'public/upload' }) // 设置文件的存放地址临时路径

const express = require('express');
const userRouter = express.Router();

const { 
  getUserInfo,
  updateUserInfo,
  getAllUserInfo,
  uploadImage
} = require('../router_handle/userInfo');

userRouter.post('/getUserInfo',getUserInfo)
userRouter.post('/updateUserInfo',updateUserInfo)
userRouter.get('/getAllUserInfo',getAllUserInfo)
// upload.single("file"):中的‘file’与uniapp中的name:'file'是对应的
userRouter.post('/uploadImage',upload.single("file"),uploadImage)

module.exports = userRouter
